package com.duowan.realtime.thirft.api;

public interface Constants {
	/**
	 * Bloomfilter服务器的默认端口
	 */
	public int DEFAULT_BF_SERVER_PORT = 4567; 
	
	/**
	 * HyperLogLog服务器默认端口
	 */
	public int DEFAULT_HLL_SERVER_PORT = 5678; 
	
	/**
	 * ping响应结果
	 */
	public static final String PING_RESPONSE = "PONG";
	
	/* the precision value for the normal set */
	static final int DEFAULT_PRECISION_NOMAL = 10;
    
	/* the precision value for the sparse set */ 
    static final int DEFAULT_PRECISION_SPARSE = 15;
    
    /* the relative standard deviation for the hyperloglog */
    static final double DEFATULT_RELATIVE_STANDARD_DEVIATION = 0.0001;
    
    // bf max count by day
 	static final int BF_MAX_NUMBER = 100;

 	// Tolerable false positive rate
 	static final double FALSE_POSITIVE_PROBABILITY = 0.001;

 	// expected (maximum) number of elements to be added
 	static final int EXPECTED_NUMBER_OF_FILTER_ELEMENTS = Integer.MAX_VALUE / (BF_MAX_NUMBER * 10);
}
